import request from '@/utils/request'

// 查询质量追溯列表
export function listTraceability(query) {
  return request({
    url: '/QualityTraceability/traceability/list',
    method: 'get',
    params: query
  })
}

// 查询质量追溯详细
export function getTraceability(id) {
  return request({
    url: '/QualityTraceability/traceability/' + id,
    method: 'get'
  })
}

// 新增质量追溯
export function addTraceability(data) {
  return request({
    url: '/QualityTraceability/traceability',
    method: 'post',
    data: data
  })
}

// 修改质量追溯
export function updateTraceability(data) {
  return request({
    url: '/QualityTraceability/traceability',
    method: 'put',
    data: data
  })
}

// 删除质量追溯
export function delTraceability(id) {
  return request({
    url: '/QualityTraceability/traceability/' + id,
    method: 'delete'
  })
}
